#include "GameStateGame.h"


GameStateGame::GameStateGame(GameStateManager& gameStateManager) :
GameState(gameStateManager)
{
}


GameStateGame::~GameStateGame()
{
}

/**
 * @fn	void GameStateGame::start()
 *
 * @brief	Trigger an event "pause" with parameter false (leaving the pause).
 *
 */
void GameStateGame::start()
{
	EventManager<bool>::getInstance().call("pause", false);
}

void GameStateGame::end()
{

}

void GameStateGame::inputKeyReturn()
{

}

/**
 * @fn	void GameStateGame::inputKeyEscape()
 *
 * @brief	Call a changeState to GameStatedPause
 *
 */
void GameStateGame::inputKeyEscape()
{
	m_gameStateManager.changeState(std::make_shared<GameStatePause>(m_gameStateManager));
}

/**
 * @fn	void GameStateGame::inputKeyUp()
 *
 * @brief	The player jumps.
 */
void GameStateGame::inputKeyUp()
{
	//TODO userinput sur le joueur
	EventManager<void>::getInstance().call("jump");
}

/**
 * @fn	void GameStateGame::inputKeyDown()
 *
 * @brief	The player crouch.
 *
 */
void GameStateGame::inputKeyDown()
{
	//TODO userinput sur le joueur

	EventManager<void>::getInstance().call("crouch");
}